From: Carlos Garnacho Date: Thu, 6 Feb 2020 09:31:17 +0000 (+0100) Subject: magnifier: Apply scale factor to crosshair length X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~162 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8b4b9d396b60f023065d8ff0f548292c49f32f02;p=gnome-shell.git magnifier: Apply scale factor to crosshair length On hidpi displays the length is double as advertised, make it match the advertised length. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/984 --- diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index d7d3506a5..af6c2567d 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -430,8 +430,10 @@ var Magnifier = class Magnifier { * lines making up the crosshairs. */ setCrosshairsLength(length) { - if (this._crossHairs) - this._crossHairs.setLength(length); + if (this._crossHairs) { + let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; + this._crossHairs.setLength(length / scaleFactor); + } } /**